import _ from "lodash";// 通过import指令添加lodash依赖，但前提需要在本项目中npm安装lodash
import printMe from "./print.js";
function component() {
    var element = document.createElement('div');
    var btn = document.createElement("button");
    btn.innerHTML = "点我";
    btn.onclick = printMe;
    //使用_其实是使用lodash模块
    element.innerHTML = _.join(['Hello', 'webpack'], ' ');
    element.appendChild(btn);
    return element;
}

document.body.appendChild(component());